#ifndef SAMPLESERVER_H
#define SAMPLESERVER_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QHostAddress>
#include <QDebug>

#include "ui_sampleserver.h"
#include "syncmanager.h"
//==============
#include "selectcalldatadialog.h"
#include "viewcontactdialog.h"
//==============

class SampleServer : public QWidget {

    Q_OBJECT

    public:
		enum Status {ON, OFF, CONNECT, ERROR};
        SampleServer();
        ~SampleServer();
    signals:
		void addContactSignal(NeoPhoneBookEntry *entry);
		void replaceContactSignal(int contactIndex, NeoPhoneBookEntry *entry);
		void deleteContactSignal(int contactIndex);
		void callContactSignal(int contactIndex);
    private slots:
        void powerSwitch();
		void updateStatus(int status);
		void phoneBookDialogCloseListener();

		void on_addButton_clicked();
		void on_deleteButton_clicked();
		void on_replaceButton_clicked();
		void on_callButton_clicked();

    private:
        Ui_SampleServer *ui;
	bool powerOn;
	//PhoneBookDialog *phoneBookDialog;
	SelectCallDataDialog *selectDialog;
	ViewContactDialog *viewDialog;
	SyncManager *syncManager;
};


#endif
